<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function two(num1 = 0, num2 = 0) {
      if (num1 > num2) {
        return num1
      } else if (num1 < num2) {
        return num2
      }
    }
    let num1 = prompt('请输入')
    let num2 = prompt('请输入')
    let num = two(num1, num2)
    console.log(num)

    function aaa(arr = []) {
      let min = arr[0]
      let max = arr[0]
      for (let i = 1; i < arr.length; i++) {
        if (max < arr[i]) {
          max = arr[i]
        }
        if (min > arr[i]) {
          min = arr[i]
        }
      }
      return [max, min]
    }
    let bbb = aaa([23, 53, 55, 76, 66, 87, 99, 100])
    console.log(`最大值：${bbb[0]}`)
    console.log(`最小值：${bbb[1]}`)
  </script>
</body>

</html>